<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/views/common/includeCommon.jsp"%>
<!DOCTYPE html>
<html lang="en_US">
    <head>
        <title><spring:message code="app.batch.title" /></title>
        <script type="text/javascript" src="${ctx}/static/js/manage/courseObjectiveAnswer/list.js"></script>
        <script type="text/javascript">
        	var owner = '${owner}';
        </script>
        <style type="text/css">
        	.input-group-addon {
			    width: 84px;
			    line-height: 20px;
			    height: 34px;
			    font-size: 12px;
			}
			.input-group {
			    position: relative;
			    display: inline-flex !important;
			    border-collapse: separate;
			    width: 360px;
			    margin-bottom: 5px;
			    line-height: 30px;
			    height: 34px;
			}
			.searchBtn {
			    height: 32px;
			    margin-bottom: 6px;
			}
			table.table {
			    clear: both;
			    margin-bottom: 6px !important;
			    max-width: none !important;
			    font-size: 12px;
			}
			.table > thead > tr > th {
			    vertical-align: bottom;
			    border-bottom: 2px solid #ddd;
			    padding: 8px 8px;
			    text-align: center;
			}
			.input_th{
			    text-align: center;
				background: rgba(255, 255, 255, .15) !important;
			}
			textarea[disabled], input[disabled], select[disabled] {
			    background: rgba(0, 0, 0, 0) !important;
			    border-color: rgba(255, 255, 255, .15) !important;
			}
        </style>
    </head>
    <body>
       	<div class="row">
			<div class="col-md-12">
				<div class="panel panel-white">
					<div class="panel-body">
						<form style="position:relative" id="splitPage" action="${ctx}/manage/courseObjectiveAnswer" method="POST" role="form" class="form-horizontal">  
							<!-- search part -->
							<div id="toolbar" class="panel panel-default" style="margin:-5 0 -5 0;padding:0 0 0 0;">
								<div class="panel-body">
									<div class="form-inline" role="form">
										<div class="form-inline form-group">
											<div class="input-group" style="width: 230px;margin-bottom: 0px;">
												<span class="input-group-addon"><spring:message code="app.courseTemplate.area.title.thfw" /></span>
												<input type="text" class="form-control" id="startNumId"
													placeholder="<spring:message code="app.courseTemplate.area.placeholder.int"/>" 
		                     						onkeyup="value=value.replace(/[^\d]/,'')" 
                                    				onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/,''))"
													style="width:100px;">
												&nbsp;-&nbsp;
												<input type="text" class="form-control" id="endNumId"
													placeholder="<spring:message code="app.courseTemplate.area.placeholder.int"/>" 
		                     						onkeyup="value=value.replace(/[^\d]/,'')" 
                                    				onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/,''))"
													style="width:100px;margin-right: 5px;">
												<button type="button" id="addBtn" class="btn btn-warning btn-sm">
													<i class="fa fa-plus"></i><spring:message code="app.courseObjectiveAnswer.action.add" />
												</button>
											</div>
										</div>
									</div>
							  	</div>
							  	<!-- buttons part -->
							  	<div class="row">
									<div class="col-md-12 space20">
										<a href="#none" class="btn btn-primary btn-add">
											<spring:message code="app.common.action.save" />
										</a>
									</div>
								</div>
							</div>
							<!-- table part -->
							<table id="dataTable" class="table table-striped table-bordered table-hover table-full-width">
	                            <thead>
	                                <tr>
	                                    <th style="width: 15%;"><spring:message code="app.courseObjectiveAnswer.title.th" /></th>
	                                    <th style="width: 70%;"><spring:message code="app.courseObjectiveAnswer.title.da" /></th>
	                                    <th style="width: 15%;"><spring:message code="app.common.action.operate" /></th>
	                                </tr>
	                            </thead>
	                            <tbody>
	                                <c:forEach items="${PARAM}" var="entity" varStatus="s">
	                                    <tr data-id="${entity.id}">
	                                        <td>
	                                        	<input type="text" class="input_th" disabled rid='${entity.id}' id="th_${entity.id}" name="th_${entity.id}" value="${entity.th}" style="width:100%;">
	                                        </td>
	                                        <td style="text-align:center;">
	                                        	<input type="text" class="input_check input_da" rid='${entity.id}' id="da_${entity.id}" name="da_${entity.id}" 
	                                        	value="${entity.da}" placeholder="<spring:message code="app.courseObjectiveAnswer.placeholder.da"/>" style="width:90%;">
	                                        </td>
	                                        <td style="text-align:center;">
	                                            <a href="#none" class="btn btn-danger btn-sm btn-delete" onclick="deltr($(this),'${entity.id}',1)"><spring:message code="app.common.action.delete" /></a>
	                                        </td>
	                                    </tr>
	                                </c:forEach>
	                            </tbody>
	                        </table>
						</form>
				    </div>
				</div>
			</div>
		</div>
    </body>
</html>